/*
 * Copyright 2011 CyberSMS.ru
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package ru.cybersms.model.response;

import java.util.Date;
import java.util.List;
import ru.cybersms.model.obj.Task;
import ru.cybersms.model.obj.Task.MessageType;
import ru.cybersms.model.obj.Task.RepeatType;

/**
 *
 * @author Андрей Шерцингер <support@cybersms.ru>
 */
public class TasksResponse extends Response {

	private List<TaskItem> tasks;

	public List<TaskItem> getTasks() {
		return tasks;
	}

	public void setTasks(List<TaskItem> tasks) {
		this.tasks = tasks;
	}

	public class TaskItem {

		private Integer id;
		private String name;
		private Date starts_at;
		private Date expires_at;
		private Date last_run;
		private Date next_run;
		private Task.RepeatType repeat;
		private Task.MessageType type;
		private boolean is_active;
		private Integer bulk_id;
		private Integer application_id;
		private String recipient;
		private String sender;
		private String message;
		private Integer lifetime;
		private Date created_at;
		private Date updated_at;

		public Integer getId() {
			return id;
		}

		public void setId(Integer id) {
			this.id = id;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public Date getStarts_at() {
			return starts_at;
		}

		public void setStarts_at(Date starts_at) {
			this.starts_at = starts_at;
		}

		public Date getExpires_at() {
			return expires_at;
		}

		public void setExpires_at(Date expires_at) {
			this.expires_at = expires_at;
		}

		public Date getLast_run() {
			return last_run;
		}

		public void setLast_run(Date last_run) {
			this.last_run = last_run;
		}

		public Date getNext_run() {
			return next_run;
		}

		public void setNext_run(Date next_run) {
			this.next_run = next_run;
		}

		public RepeatType getRepeat() {
			return repeat;
		}

		public void setRepeat(RepeatType repeat) {
			this.repeat = repeat;
		}

		public MessageType getType() {
			return type;
		}

		public void setType(MessageType type) {
			this.type = type;
		}

		public boolean isIs_active() {
			return is_active;
		}

		public void setIs_active(boolean is_active) {
			this.is_active = is_active;
		}

		public Integer getBulk_id() {
			return bulk_id;
		}

		public void setBulk_id(Integer bulk_id) {
			this.bulk_id = bulk_id;
		}

		public Integer getApplication_id() {
			return application_id;
		}

		public void setApplication_id(Integer application_id) {
			this.application_id = application_id;
		}

		public String getRecipient() {
			return recipient;
		}

		public void setRecipient(String recipient) {
			this.recipient = recipient;
		}

		public String getSender() {
			return sender;
		}

		public void setSender(String sender) {
			this.sender = sender;
		}

		public String getMessage() {
			return message;
		}

		public void setMessage(String message) {
			this.message = message;
		}

		public Integer getLifetime() {
			return lifetime;
		}

		public void setLifetime(Integer lifetime) {
			this.lifetime = lifetime;
		}

		public Date getCreated_at() {
			return created_at;
		}

		public void setCreated_at(Date created_at) {
			this.created_at = created_at;
		}

		public Date getUpdated_at() {
			return updated_at;
		}

		public void setUpdated_at(Date updated_at) {
			this.updated_at = updated_at;
		}

		@Override
		public String toString() {
			return "TaskItem{" + "id=" + id + ", name=" + name + ", starts_at=" + starts_at + ", expires_at=" + expires_at + ", last_run=" + last_run + ", next_run=" + next_run + ", repeat=" + repeat + ", type=" + type + ", is_active=" + is_active + ", bulk_id=" + bulk_id + ", application_id=" + application_id + ", recipient=" + recipient + ", sender=" + sender + ", message=" + message + ", lifetime=" + lifetime + ", created_at=" + created_at + ", updated_at=" + updated_at + '}';
		}

	}
}
